<template>
	<view class="game-name">
		<view class="text-magic" data-word="逃出五角大楼">
			逃出五角大楼
			<view class="white"></view>
		</view>
		<view class="info">
			抵制不良游戏，拒绝盗版游戏。注意自我保护，谨防受骗上当。适度游戏益脑，沉迷游戏伤身。合理安排时间，享受健康生活。
		</view>
		<view class="info2">
			2024 - 2025 版权所有 © 成都信息工程大学软件1班 www.cuit.com
		</view>
		<view class="loding">
			资源加载中...{{loding}}%
		</view>
	</view>
</template>

<script>
	import audioManager from '@/utils/audioManager.js';
	export default {
		data() {
			return {
				isLandscape:false,
				loding:0
			}
		},
		//当页面加载完成触发
		mounted() {
			this.checkOrientation();
		},
		//当页面摧毁前触发
		beforeDestroy() {
		},
		methods: {
			checkOrientation() {
			  //播放bgm
			  audioManager.playAudio("load_bgm",false);
			  audioManager.playAudio("jingdi",false);
			  let lod = setInterval(()=>{
			  this.loding = this.loding + (Math.floor(Math.random() * 5) + 1);
			  if(this.loding >= 100){
				  clearInterval(lod);
				  audioManager.destroyAll();
				  uni.redirectTo({
					url:"/pages/index/index"
				  })
			  }
			  },500);
			}
		}
	}
</script>

<style scoped lang="scss">
.show-info{
	width: 100%;
	height: 100vh;
	background-color: black;
	color: #fff;
	text-align: center;
	line-height: 100vh;
	font-size: 25px;
}
.game-name{
	width: 100%;
	height: 100vh;
	background-color: #000;
}

.info{
	position: fixed;
	width: 100%;
	height: 20px;
	bottom: 10px;
	color: #a4aca5;
	text-align: center;
	line-height: 20px;
	font-size: 11px;
}
.info2{
	position: fixed;
	width: 100%;
	height: 20px;
	bottom: 30px;
	color: #a4aca5;
	text-align: center;
	line-height: 20px;
	font-size: 11px;
}

.loding{
	position: fixed;
	right: 20px;
	bottom: 50px;
	color: #d0d0d0;
	font-size: 15px;
}



/* 以下是文字效果 */
.text-magic {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(10%, -50%) scale(2.4);
    width: 300px;
    font-size: 25px;
    font-family: Raleway, Verdana, Arial;
    color: #fff;
}
.white {
    position: absolute;
    left: -10px;
    width: 100%;
    height: 3px;
    background: #000;
    z-index: 4;
    animation: whiteMove 3s ease-out infinite;
}

.text-magic::before {
    content: attr(data-word);
    position: absolute;
    top: 0;
    left: 0.5px;
    height: 0px;
    color: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    z-index: 2;
    animation: redShadow 1s ease-in infinite;
    filter: contrast(200%);
    text-shadow: 1px 0 0 red;
}

.text-magic::after {
    content: attr(data-word);
    position: absolute;
    top: 0;
    left: -3px;
    height: 36px;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    z-index: 3;
    background: rgba(0, 0, 0, 0.9);
    animation: redHeight 1.5s ease-out infinite;
    filter: contrast(200%);
    text-shadow: -1px 0 0 cyan;
    mix-blend-mode: darken;
}

@keyframes redShadow {
    20% {
        height: 32px;
    }
    60% {
        height: 6px;
    }
    100% {
        height: 42px;
    }
}

@keyframes redHeight {
    20% {
        height: 42px;
    }
    35% {
        height: 12px;
    }
    50% {
        height: 40px;
    }
    60% {
        height: 20px;
    }
    70% {
        height: 34px;
    }
    80% {
        height: 22px;
    }
    100% {
        height: 0px;
    }
}

@keyframes whiteMove {
    8% {
        top: 38px;
    }
    14% {
        top: 8px;
    }
    20% {
        top: 42px;
    }
    32% {
        top: 2px;
    }
    99% {
        top: 30px;
    }
}
</style>
